package mine.thread;

/**
 * @author huangchao
 * @date 2022/1/26
 */
public class InterruptDemo {
    public static void main(String[] args) {
        Thread thread = new Thread(() -> {
            int a = 0;
            Thread.currentThread().interrupt();
            for (int i = 0; i < 100000; i++) {
                a++;
            }
        });
        thread.start();
        System.out.println(thread.isInterrupted());
        System.out.println(thread.isInterrupted());
    }
}
